<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<title>管理设置</title>
<%@ include file="/WEB-INF/layouts/comm/datatables.jsp"%>
</head>
<body>
	<div class="mod_header">
		<div class="title">
			<h2 id="h_title">参数设置</h2>
		</div>
	</div>
	<ol class="breadcrumb">
		<li><a href="#">管理设置</a></li>
		<li class="active">参数设置</li>
	</ol>
	<div class="mod_basic">
		<div class="title">
			<h3>参数设置</h3>
		</div>

		<div class="content">
			<div class="sub_content_table">
				<table
					class="table table-striped table-bordered table-hover datatable"
					id="datatable">
					<thead>
						<tr>
							<th>名称</th>
							<th>属性值</th>
							<th>操作</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>
	<footer_body> <script id="tpl"
		type="text/x-handlebars-template">
	    {{#each func}}
	    <button type="button" class="btn btn-{{this.type}} btn-sm" onclick="{{this.fn}}">{{this.name}}</button>
	    {{/each}}
	</script> <script>
		var tpl = $("#tpl").html();
		//预编译模板
		var template = Handlebars.compile(tpl);

		base.menu.active('menu_701');

		var table = base.datatable
				.table({
					tableid : '#datatable',
					aoColumns : [ {
						"mDataProp" : "name"
					}, {
						"mDataProp" : "val"
					} ],
					columnDefs : [ {
						targets : 2,
						render : function(a, b, c, d) {
							var context = {
								func : [ {
									"name" : "修改",
									"fn" : " window.location.href='${ctx}/webCustomer/sysConfig/show?id="
											+ c.id + "'",
									"type" : "danger"
								} ]
							};
							var html = template(context);
							return html;
						}
					} ],
					url : "${ctx}/webCustomer/sysConfig/data?rand=" + Math.random()
				});
	</script> </footer_body>
</body>
</html>